Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stratum v2 Template Provider common functionality #49

Open
wants to merge 11 commits into
base: 2024/06/sv2_connection
Choose a base branch
from

Conversation

@Sjors
Copy link
Owner Author

Sjors commented Aug 13, 2024

Updated to the latest interface changes proposed in bitcoin#30409 and #53.

@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from b549fd6 to 22d033c Compare August 13, 2024 17:14
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch 2 times, most recently from 491755c to 16d2381 Compare August 13, 2024 18:07
@Sjors Sjors force-pushed the 2024/06/sv2_connection branch 3 times, most recently from 4f957ee to b69544c Compare August 29, 2024 11:49
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch 2 times, most recently from ca73422 to 4fa25e0 Compare August 29, 2024 11:59
@Sjors
Copy link
Owner Author

Sjors commented Aug 29, 2024

Rebased for CMake

@Sjors
Copy link
Owner Author

Sjors commented Aug 30, 2024

One test still seems brittle:

src/test/sv2_template_provider_tests.cpp(256): fatal error: in "sv2_template_provider_tests/client_tests": critical check tester.GetBlockTemplateCount() == 3 has failed [2 != 3]

@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from b69544c to 1ca68d2 Compare September 5, 2024 12:57
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from 1f720ff to 1912743 Compare September 5, 2024 15:56
@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from 1ca68d2 to b578e0a Compare September 10, 2024 14:54
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch 2 times, most recently from 598f08a to 436dc4d Compare September 11, 2024 05:39
@Sjors
Copy link
Owner Author

Sjors commented Sep 11, 2024

Moved TemplateProvider from node to common so that in #48 bitcoin-mine does not depend on bitcoin-node.

@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from 436dc4d to 46fa8f1 Compare September 11, 2024 06:37
@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from b578e0a to 489c9fb Compare September 19, 2024 15:02
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch 2 times, most recently from 7db898e to 765af74 Compare September 19, 2024 16:13
@Sjors
Copy link
Owner Author

Sjors commented Nov 25, 2024

I got rid of the NewWorkSet struct and BuildNewWorkSet helper, moved some repeating code to SendWork.

I also noticed that with -DCMAKE_BUILD_TYPE=Debug the sv2_template_provider_tests run much faster than with the regular build.

@Sjors
Copy link
Owner Author

Sjors commented Dec 2, 2024

Included changes from #72 which fixes a crash and the test run at normal speed again.

@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from c413ad7 to 9cac0b8 Compare December 2, 2024 20:00
@Sjors
Copy link
Owner Author

Sjors commented Dec 2, 2024

@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from 9cac0b8 to fd26e38 Compare December 16, 2024 04:41
@Sjors
Copy link
Owner Author

Sjors commented Dec 16, 2024

Included a fix for #74: https://github.com/Sjors/bitcoin/compare/9cac0b8d1e84aa86301fd1e7907aaeeaeb351600..fd26e38c2af8ce82a95971392e85d5d23d3fd828

Also updated the list of interface changes in the PR description.

@Sjors Sjors force-pushed the 2024/06/sv2_connection branch 2 times, most recently from ce785e2 to 4eb05e2 Compare December 19, 2024 02:14
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from fd26e38 to a2882d8 Compare December 19, 2024 02:26
@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from 4eb05e2 to 4ba3ba8 Compare December 19, 2024 03:05
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from a2882d8 to 51fdf1d Compare December 19, 2024 03:07
@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from 4ba3ba8 to a3a7a46 Compare December 19, 2024 06:12
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from 51fdf1d to 91ea715 Compare December 19, 2024 06:14
@Sjors Sjors force-pushed the 2024/06/sv2_connection branch from a3a7a46 to 6da01f6 Compare January 24, 2025 11:13
@Sjors Sjors force-pushed the 2024/07/sv2-tp-common branch from 91ea715 to 4c07541 Compare January 24, 2025 14:02
@Sjors
Copy link
Owner Author

Sjors commented Jan 24, 2025

Rebased after bitcoin#31325, bitcoin#31581.

The rebase includes bitcoin#31376 which ensures that new templates account for the timewarp rule (important on testnet4 because of the MTP drift).

The rebase also includes bitcoin#31583 which makes getmininginfo a lot more useful! E.g. if displays the difficulty and target for the next block.

Using the latest version of bitcoin#31283 which has waitNext() return a new template once testnet difficulty drops after 20 minutes. It also requires a small refactor.

In anticipation of bitcoin#31384 I changed the block_reserved_weight calculation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant